package main.java.com.jiao;

/**
 * 冒泡排序
 */
public class BubbleSort {
    int [] arr = {10,5,9,43,12,16,44,88,80};

    public static void sort(int [] arr){
        for (int i = 0;i < arr.length - 1;i++){
            for (int j = i + 1; j< arr.length ; j++){
                if (arr[j] < arr[i]){
                    int min = arr [i];
                    arr[i] = arr[j];
                    arr[j] = min;
                }
            }
        }
    }
}
